#ifndef __DO_CONFIG_H__
#define __DO_CONFIG_H__
#include "do_test.h"

void config_do_mode_level(void *param) {
    struct do_param_t *pparam = (struct do_param_t *)param;
    uint8_t i = 0;

    if (pparam->write_cnt == 0)
        pparam->write_cnt = 1;

    pparam->en_write = 1;
    pparam->write_cnt = 1;

    for (i = 0; i < pparam->dev_num; i++) {
        pparam->dev[i].index = i;
        pparam->dev[i].mode = DO_MOD_LEVEL;
        pparam->dev[i].timeout_sta = 1;
        pparam->dev[i].timeout_sec = 2;
        pparam->dev[i].set_val = 0;
        pparam->dev[i].pulse_high = 0;
        pparam->dev[i].pulse_cycle = 0;
        pparam->dev[i].pulse_num = 0;
    }
};

void config_do_mode_pulse(void *param) {
    struct do_param_t *pparam = (struct do_param_t *)param;
    uint8_t i = 0;

    if (pparam->write_cnt == 0)
        pparam->write_cnt = 1;

    pparam->en_write = 1;
    pparam->write_cnt = 1;

    for (i = 0; i < pparam->dev_num; i++) {
        pparam->dev[i].index = i;
        pparam->dev[i].mode = DO_MOD_PULSE;
        pparam->dev[i].timeout_sta = 0;
        pparam->dev[i].timeout_sec = 0;
        pparam->dev[i].set_val = 0;
        pparam->dev[i].pulse_high = 500;
        pparam->dev[i].pulse_cycle = 1000;
        pparam->dev[i].pulse_num = 10;
    }
};

#endif /* __DO_CONFIG_H__ */
